package zuoye1;

import java.io.*;

public class BRDemo {
    public static void main(String[] args) throws IOException {
        /*
        FileInputStream fs=new FileInputStream("pw.txt");//文件流
        InputStreamReader isr=new InputStreamReader(fs);//转换流
        BufferedReader br=new BufferedReader(isr);//加个BUFF
        String line ;
        while ((line=br.readLine())!=null){
            System.out.println(line);
        }br.close();
        System.out.println("完毕");

         */
        /*
        FileInputStream fis=new FileInputStream("pw.txt");
        InputStreamReader isr=new InputStreamReader(fis);
        BufferedReader br=new BufferedReader(isr);
        String line;
        while ((line=br.readLine())!=null){
            System.out.println(line);
        }br.close();
        System.out.println("完毕");

         */
        FileInputStream fis=new FileInputStream("pw.txt");
        InputStreamReader isr=new InputStreamReader(fis);
        BufferedReader br=new BufferedReader(isr);
        String line;
        while ((line=br.readLine())!=null){
            System.out.println(line);
        }br.close();
        System.out.println("完毕");
    }
}
